Week 10: Chordograms and keygrams over time

Histogram of they of songs listened in 2015 and 2019


In my portfolio, I want to see how my music listening has changed over the years. To analyse this, I have a corpus that consists of the songs I have listened to since 2014. One thing that might have changed is the key of the songs that I have listened to. To analyse this, I made a histogram of all the keys of the songs in 2015, my final year of high school, and 2019, when I was halfway in my second year of Psychology.

In the histogram, you can see for every key what its proportion is to all of the keys of the songs that I listened to in 2015 and 2019. It seems that D is the most popular, and D# the least. There are slight differences in key between the years, but most noticably, it seems I am listening to far fewer songs in the key of A. Why is this?

To figure this out, I made a table of the artists I listened to in each year that wrote songs in A, and looked at the artists with the highest frequency. Not to my surprise, most songs in A were written by artist like Mac DeMarco, Beach House, Grizzly Bear, and The Black Keys, which are all alternative/ indie artists using guitars. The A chord is popular in songs written on guitar, since it can be played as an open chord, and it goes well with many other open chords. Since 2015, I have started listening to a lot less guitar-centered music, which might explain why I am also listening to fewer songs in the key of A.

Tempo mean and standard deviation


For this plot, I used my top 15 songs from 2015 and 2019. Since I had to use the data I fetched from LastFM, I had a hard time getting the data right so it would work with the compmus package. I managed to get it right however, and the resulting plot is quite interesting.

Here you can see the mean tempo plotted against the SD of tempo, colour indicating tempo, size indicating song duration, and opacity indicating loudness. There seem to be quite large differences between 2015 and 2019. First of all, the range of tempo is much larger in 2019: it spans from ~70 to ~160, while in 2015 the tempo is clustered around 100. This indicates that in 2019, my music taste has become more varied. This can also be seen in song duration and loudness: in 2015 they seem to be similar, while in 2019 it seems to vary more.

Interestingly, the standard deviation of tempo seems to increase with tempo. Does this mean that higher tempo songs also have a higher deviation in tempo? I have no clue.

Overview of the songs I have listened to per year

Shiny applications not supported in static R Markdown documents

Previous weeks (needs revision)

A small introduction page


Since 2014, I have been keeping track of nearly every song I have listened to. I did this using a website called Last FM. Music I have listened to using desktop programs like iTunes and MusicBee are all included, as well as all my Spotify plays. Recording a play is called scrobbling, and this way I have “scrobbled” more than 118.000 played songs since around April 2014, a period of nearly 6 years. Using a package called “scrobbler” I have imported all my scrobbles to R, and saved it as a .csv file.

Last week, my goal was to link these scrobbles to the Spotify features. Using the code by Andrew Walker that can be found here, after some tweaking, I finally managed to do so! Using the Title and Artist from the scrobbles, the ID from Spotify is fetched through the API, that can be used to fetch the features, a process that took about 6 hours in total. This has resulted in very interesting data, that I will try to visualize the coming weeks.

I have been collecting data on my music listening habits since 2014, and I now have a dataset with timestamped songs and the corresponding Spotify features. How has time influenced what music I listen to?

To show you the data I have collected over the years, a table with all the songs, and the how often they have been played.

Last FM: Average number of songs listened to per day over time


Before going into the Spotify features, it is useful to take a look at some generic plots of my music listening habits, to get an idea of the data. One aspect of music listening habits is how much music you listen to. So, I calculated the amount of music I listen to per day, for each date. This is done by dividing the amount of songs listened to by the amount of days that have passed.

As can be seen in plot 1, the amount of music I listen to has been increasing over time. This can be a confounder when analysing how my music listening has changed, because the samples might not be comparable. However, I think for this project this will not be a problem, but it is something to keep in mind.

Last FM: average number of songs listened to per hour


Another interesting thing to show before getting into the Spotify features, is the average number of songs listened to per hour, shown in plot 2. As you can see, the music listening data reflects my living patterns well: At night I listen to the least music, and in the morning it steadily increases. There is a small dip around 18 at dinnertime, and it increases again after.

Spotify: Danceability per month


In class, prof. Burgoyne showed us a plot of the average danceability per season. In the winter people listened to less danceable music, and in the summer much more. I wondered if this was replicable with my own music listening data. As you can see, it is! There is a dip in the months after January, and a peak in August. Interesting to note that my music listening habits are influenced by the time of the year, and that this is can actually be seen in the data. This might tell me something about how useful my data and the corresponding Spotify features will be to answer my research questions.

Spotify: How has my music listening changed over time?


Now on to the real data. My research is focussed around the following question: How has my music listening changed over time? In order for this question to even be relevant, it means that my music listening has to have changed over time. On top of that, this also has to be reflected in the data. This is why I decided to calculate the correlation between time and the Spotify features. Since a correlation spans from -1 to 1, many of the correlations are very high. This means that a lot of these features have changed by a lot over time, which means my music listening has changed a lot. I had hoped to see this, since it looks very promising for further analyses!